home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-822ext-md5-01.txt < prev    next >
Text File  |  1993-04-12  |  8KB  |  293 lines

  1.  
  2.           draft              Content-MD5 Header Field             Apr 10
  3.  
  4.  
  5.                            The Content-MD5 Header Field
  6.  
  7.                              Sat Apr 10 08:58:48 1993
  8.  
  9.  
  10.                                  Marshall T. Rose
  11.                            Dover Beach Consulting, Inc.
  12.                               mrose@dbc.mtview.ca.us
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                Status of this Memo
  19.  
  20.           This document is an Internet Draft.  Internet Drafts are
  21.           working documents of the Internet Engineering Task Force
  22.           (IETF), its Areas, and its Working Groups.  Note that other
  23.           groups may also distribute working documents as Internet
  24.           Drafts.
  25.  
  26.           Internet Drafts are valid for a maximum of six months and may
  27.           be updated, replaced, or obsoleted by other documents at any
  28.           time.  It is inappropriate to use Internet Drafts as reference
  29.           material or to cite them other than as a "work in progress".
  30.  
  31.  
  32.                                      Abstract
  33.  
  34.           This memo specifies an optional header field, Content-MD5, for
  35.           use with MIME-conformant messages.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.           Expires October 10, 1993                              [Page 1]
  56.  
  57.  
  58.  
  59.  
  60.  
  61.           draft              Content-MD5 Header Field             Apr 10
  62.  
  63.  
  64.           1.  Introduction
  65.  
  66.           Despite all of the mechanisms provided by MIME [1] which
  67.           attempt to protect data from being damaged in the course of
  68.           email transport, it is still desirable to have a mechanism for
  69.           verifying that the data, once decoded, are intact.  For this
  70.           reason, this memo defines the use of an optional header field,
  71.           Content-MD5, which may be used as a message integrity check
  72.           (MIC), to verify that the decoded data are the same data that
  73.           were initially sent.
  74.  
  75.           MD5 is an algorithm for computing a 128 bit "digest" of
  76.           arbitrary-length data, with a high degree of confidence that
  77.           any alterations in the data will be reflected in alterations
  78.           in the digest.  The MD5 algorithm itself is defined in [2].
  79.           This memo specifies how the algorithm may be used as an
  80.           integrity check for MIME mail.
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.           Expires October 10, 1993                              [Page 2]
  115.  
  116.  
  117.  
  118.  
  119.  
  120.           draft              Content-MD5 Header Field             Apr 10
  121.  
  122.  
  123.           2.  Generation of the Content-MD5 Field
  124.  
  125.           The Content-MD5 field is generated by only an originating user
  126.           agent.  Message relays and gateways are expressly forbidden
  127.           from generating a Content-MD5 field.
  128.  
  129.           Use of the Content-MD5 field is completely optional, but its
  130.           use is recommended whenever complete data integrity is
  131.           desired, but Privacy-Enhanced Mail services [3] are not
  132.           available.  The Content-MD5 field may only be added to MIME
  133.           entities of a `leaf' nature, i.e., the Content-MD5 field may
  134.           be used with any content type other than multipart or
  135.           message/rfc822.
  136.  
  137.           To generate the value of the Content-MD5 field, the MD5
  138.           algorithm is computed on the canonical form of the data.  In
  139.           particular, this means that the sender applies the MD5
  140.           algorithm on the raw data, before applying any content-
  141.           transfer-encoding, and that the receiver also applies the MD5
  142.           algorithm on the raw data, after undoing any content-
  143.           transfer-encoding.  For textual data, the MD5 algorithm must
  144.           be computed on data in which the canonical form for newlines
  145.           applies, that is, in which each newline is represented by a
  146.           CR-LF pair.
  147.  
  148.           The output of the MD5 algorithm is a 128 bit digest.  When
  149.           viewed in network byte order (big-endian order), this yields a
  150.           sequence of 16 octets of binary data.  These 16 octets are
  151.           then encoded according to the base64 algorithm in order to
  152.           obtain the value that is placed in the Content-MD5 field.
  153.           Thus, if the application of the MD5 algorithm over the raw
  154.           data of a MIME entity results in a digest having the
  155.           (unlikely) value of "Check Integrity!", then that MIME
  156.           entity's header could contain the field
  157.  
  158.                Content-MD5:  Q2hlY2sgSW50ZWdyaXR5IQ==
  159.  
  160.           Finally, as discussed in Appendix B of [1], textual data is
  161.           regularly altered in the normal delivery of mail.  Because the
  162.           addition or deletion of trailing white space will result in a
  163.           different digest, either the quoted-printable or base64
  164.           algorithm should be employed as a content-transfer-encoding
  165.           when the Content-MD5 field is used.
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.           Expires October 10, 1993                              [Page 3]
  174.  
  175.  
  176.  
  177.  
  178.  
  179.           draft              Content-MD5 Header Field             Apr 10
  180.  
  181.  
  182.           3.  Processing the Content-MD5 field
  183.  
  184.           If the Content-MD5 field is present, a recipient user agent
  185.           may choose to use it to verify that the contents of a MIME
  186.           entity have not been modified during transport.  Message
  187.           relays and gateways are expressly forbidden to alter its
  188.           processing based on the presence of the Content-MD5 field.
  189.           However, a message gateway is allowed to remove the Content-
  190.           MD5 field if the corresponding MIME entity is translated into
  191.           a different content-type.
  192.  
  193.  
  194.           4.  Security Considerations
  195.  
  196.           This document specifies a data integrity service that protects
  197.           data from accidental modification while in transit from the
  198.           sender to the recipient.  A secure data integrity service,
  199.           such as that provided by Privacy Enhanced Mail [3], is
  200.           conjectured to protect data from all modifications.
  201.  
  202.  
  203.           5.  Acknowledgements
  204.  
  205.           This memo is based almost entirely on text originally written
  206.           by Nathaniel Borenstein of Bellcore.  In addition, several
  207.           improvements were suggested by Keith Moore of the University
  208.           of Tennessee, Knoxville.
  209.  
  210.  
  211.           6.  References
  212.  
  213.           [1]  N. Borenstein, N. Freed.  MIME: Mechanisms for Specifying
  214.                and Describing the Format of Internet Message Bodies.
  215.                Request for Comments 1341, (June, 1992).
  216.  
  217.           [2]  R. Rivest, The MD5 Message-Digest Algorithm.  Request for
  218.                Comments 1321, (April, 1992).
  219.  
  220.           [3]  J. Linn, Privacy Enhancement for Internet Electronic
  221.                Mail, Part I: Message Encryption and Authentication
  222.                Procedures.  Request for Comments 1421, (February, 1993).
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.           Expires October 10, 1993                              [Page 4]
  233.  
  234.  
  235.  
  236.  
  237.  
  238.           draft              Content-MD5 Header Field             Apr 10
  239.  
  240.  
  241.           Table of Contents
  242.  
  243.  
  244.           1 Introduction ..........................................    2
  245.           2 Generation of the Content-MD5 Field ...................    3
  246.           3 Processing the Content-MD5 field ......................    4
  247.           4 Security Considerations ...............................    4
  248.           5 Acknowledgements ......................................    4
  249.           6 References ............................................    4
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.           Expires October 10, 1993                              [Page 5]
  292.  
  293.